<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/axios.min.js"></script>
    <script src="/util.js"></script>
    <script>
        function land(){
            axios.get("/user/login",{
                params:{
                    userName:$("userName").value,
                    pwd:$("pwd").value,
                    userCode:$("userCode").value
                }
            }).then(resp =>{
                if(resp.data == "ok"){
                    $("infoDiv").innerHTML = "登陆成功";
                }
                else if(resp.data == "no"){
                    $("infoDiv").innerHTML = "登陆失败";
                }
                else {
                    $("infoDiv").innerHTML = resp.data;
                }
            })
        }
    </script>
</head>
<body>
    <div id="infoDiv"></div>
    用户名：<input type="text" id="userName"><br>
    密码：<input type="password" id="pwd"><br>
    验证码：<img src="/checkCode"><br>
    请输入验证码：<input type="text" id="userCode"><br>
    <input type="button" value="登陆" onclick="land()">
</body>
</html>